<template>
	<view class="wrap spaceBet">
		<image class="ogzLogo" v-if="cusService.ogzHeadImg == ''" src="../../../../static/images/groupService/orgDef.png"></image>
		<image class="ogzLogo" v-else :src="cusService.ogzHeadImg"></image>
		<view class="ogzInfo">
			<view class="ogzName spaceBet">
				<view>{{cusService.ogzName}}</view>
				<view class="distance" @tap="goCurrPos">
					<text class="iconfont icon-daohang"></text>
					<text>距{{distance(cusService.distance)}}km</text>
				</view>
			</view>
			<view class="ogzAddress">{{cusService.address}}</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			cusService:Object
		},
		computed:{
			distance(){
				return function(distance){
					return (distance/1000).toFixed(2)
				}
			}
		},
		methods:{
			goCurrPos(){
				this.$emit('goCurrPos')
			}
		}
	}
</script>

<style lang='scss' scoped>
	.ogzInfo{
		width: 86%;
		.ogzName{
			font-weight: bold;
			font-size: $font-size32;
			color: $pss-text-color3;
			margin-bottom: 10rpx;
			.distance{
				font-weight: normal;
				font-size: $font-size24;
				color: #20d3a8;
				.icon-daohang{
					font-size: $font-size24;
				}
			}
		}
		.ogzAddress{
			font-size: $font-size26;
			color: $pss-text-color8;
		}
	}
	.ogzLogo{
		width: 80rpx;
		height: 80rpx;
		border-radius: 50%;
	}
	.wrap{
		padding: 20rpx 30rpx;
		background: #fff;
		margin-bottom: 20rpx;
	}
</style>